//使用经过二次封装的axios实例发请求
import service from "../../utils/request";

//一个接口封装成一个函数
export function admin_delete(payload = {}){

    // service.get('/admin/admin/delete',{params:payload})
    // service.post('/admin/admin/delete',payload)

    // service({
    //     url:'/admin/admin/delete',
    //     method:'get',
    //     params: payload
    // })
    // service({
    //     url:'/admin/admin/delete',
    //     method:'post',
    //     data: payload
    // })

    return service({
        url:'/admin/admin/delete',
        method:'post',
        data: payload
    })
}
export function admin_add(payload = {}){
    return service({
        url:'/admin/admin/add',
        method:'post',
        data: payload
    })
}
export function admin_login(payload = {}){
    return service({
        url:'/admin/admin/login',
        method:'post',
        data: payload
    })
}
export function admin_update(payload = {}){
    return service({
        url:'/admin/admin/update',
        method:'post',
        data: payload
    })
}
export function admin_list(payload = {}){
    return service({
        url:'/admin/admin/list',
        method:'get',
        params: payload
    })
}
//...